/**
 * @param {number} m
 * @param {number} n
 * @param {number[][]} ops
 * @return {number}
*/
var maxCount = function(m, n, ops) {
  if(ops.length == 0) return m * n;
  let minA = Math.max(m, n), minB = Math.max(m, n);
  for(let i = 0; i < ops.length; i++) {
    minA = Math.min(minA, ops[i][0]);
    minB = Math.min(minB, ops[i][1]);
  }
  return minA * minB;
};
let m = 3, n = 3, ops = [[2,2],[3,3]];
console.log(maxCount(m, n, ops));
m = 3, n = 3, ops = [[2,2],[3,3],[3,3],[3,3],[2,2],[3,3],[3,3],[3,3],[2,2],[3,3],[3,3],[3,3]];
console.log(maxCount(m, n, ops));
m = 3, n = 3, ops = [];
console.log(maxCount(m, n, ops));
